package Day010_排序算法_异常.ZuoYe;

import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        String[] arr = {"星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"};

        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个正数1-7:");
        int i = sc.nextInt();

        try {
            System.out.println(arr[i - 1]);
        }
        catch (IndexOutOfBoundsException e){
            System.out.println("输入错误！！");
        }
    }
}
